package com.corpgovernment.organization.controller.idcard;

import com.corpgovernment.common.base.JSONResult;
import com.corpgovernment.organization.service.IOrgUserIdCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户证件controller
 *
 * @author wangyujue
 */
@RestController
@RequestMapping("/org/idCard")
public class OrganizationUserIdCardController {

    @Autowired
    private IOrgUserIdCardService organizationUserIdCardService;

    /**
     * 查询用户证件卡列表
     *
     * @param request
     * @return
     */
    @RequestMapping("/listUserIdCard")
    public JSONResult listUserIdCard() {
//        List<MbOrgUserIdcard> list = organizationUserIdCardService.findByEmployeeUid(request.getEmployeeUid());
        return JSONResult.ok();
    }

    /**
     * 删除用户证件信息
     *
     * @return
     */
    @DeleteMapping("/deleteUserIdCard/{id}")
    public JSONResult deleteUserIdCard(@PathVariable(name = "id") Integer id) {
        boolean flag = organizationUserIdCardService.delete(id);
        return JSONResult.success(flag);
    }
}
